revXMLAttributes
Type
function
Summary
Returns a list of all attributes and their values for the specified node.
Syntax
revXMLAttributes(<treeID>, <node>, <valueDelim>, <attributeDelim>)
Description
Use the revXMLAttributes function to display a node's attributes or to scan each attribute in a repeat loop.
If the revXMLAttributes function encounters an error, it returns an error message starting with "xmlerr".
The revXMLAttributes function is part of the XML library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.
Parameters
Name | Type | Description |
---|---|---|
treeID | The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree. | |
node | The path to the node whose attributes you want to list. | |
valueDelim | string | A string that separates an attribute's value from its name. |
attributeDelim | string | A string that separates attribute name/value pairs from each other. |
Examples
revXMLAttributes(3,"/Continents",": ",return)
put revXMLAttributes(myTree,thisNode," - ",";") into field "Attr"
repeat for each line thisLine in revXMLAttributes(1,"/",tab,return)
Related
library: XML library
command: revXMLSetAttribute
control structure: function, repeat
function: revXMLAttributeValues, revXMLText, revXMLAttribute, revXMLMatchingNode, revXMLChildContents
glossary: node, Standalone Application Settings, loop, attribute, return, standalone application, LiveCode custom library
keyword: string
Compatibility and Support
Introduced
LiveCode 2.0
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile